<style>
    .form-group{
        margin-bottom: 0;
    }
</style>
<div class="modal-dialog modal-dialog-centered modal-dialog-scrollable modal-md">
    <div class="modal-content">

        <div class="modal-header  light-blue darken-3 white-text">
            <h5 class="modal-title">{{ title }}</h5>
             <button type="button" class="btn-close" data-mdb-dismiss="modal" aria-label="Close"></button>
        </div>
        <div class="modal-body">
            {{ form_start(form) }}
            <div class="row d-flex align-items-center textarea">
                <div class="col-lg-8 ">
                    {{ form_row(form.name) }}
                </div>
                <div class="col-lg-4">
                    {{ form_row(form.submit) }}
                </div>
                <div class="col-lg-12 mt-4">
                    <div class="form-group">
                        <input type="text" id="searchAddressGroup" placeholder="{{ 'Suche'|trans }}" class="form-control">
                    </div>
                </div>

                <div class="col-lg-12 mt-2 ">
                    <ul class="list-group" id="addressGroupList">
                        {% set name = null %}
                        {%  for member in form.member|sort((a, b) => a.vars.attr['data-labelNoIcon']|lower <=> b.vars.attr['data-labelNoIcon']|lower)  %}
                            {% if member.vars.attr['data-labelNoIcon']|first|upper != name %}
                                <li class="list-group-item capital-Letter"
                                    id="adressbook_{{ member.vars.attr['data-labelNoIcon']|first|upper }}">{{ member.vars.attr['data-labelNoIcon']|first|upper }}</li>
                                {% set name = member.vars.attr['data-labelNoIcon']|first|upper %}
                            {% endif %}
                            <li class="list-group-item adressbookline" data-indexer="{{ member.vars.attr['data-indexer'] }}">
                                {{ form_widget(member)|raw }}
                            </li>
                        {% endfor %}
                    </ul>

                </div>

            </div>
            {{ form_end(form) }}
        </div>
    </div>
</div>

